<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>今博士_注册</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<link rel="stylesheet" href="__CSS__/reset.css" />
<link rel="stylesheet" href="__CSS__/xiugai.css" />
</head>
<body>
	<div class="logo"><img src="__IMG__/logo.png"></div>
	
	<div class="main">
		<form id="signupForm" method="post">
			<div class="main1">
				<span class="mm mm-dl"><img src="__IMG__/zhuce/username.png"></span>
				<input type="text" id="name" name="name" placeholder="请输入您的用户名">
			<!-- <span id="names"></span> -->
			</div>
			<div class="main1">
				<span class="mm mm-phone"><img src="__IMG__/zhuce/phone.png"></span>
				<input type="text" name="phone" placeholder="请输入您的手机号码">
			</div>
<!-- 			<div class="main1 yzm">
				<div class="yzm-l">
					<span class="mm mm-yzm"><img src="__IMG__/yzm.png"></span>
					<input type="text" name="" placeholder="请输入验证码">
				</div>
				<div class="hqyzm">获取验证码</div>

			</div> -->
			<div class="main1">
				<span class="mm mm-yx"><img src="__IMG__/zhuce/message.png"></span>
				<input type="email" name="email" placeholder="请输入您的邮箱">
			</div>

			<div class="main1">
				<span class="mm"><img src="__IMG__/zhuce/password.png"></span>
				<input type="password" name="pwd" placeholder="请输入您的密码">
			</div>
			<span id="pwds"></span>
			<div class="main1">
				<span class="mm"><img src="__IMG__/zhuce/password.png"></span>
				<input type="password" name="repwd" placeholder="请再次输入您的密码">
			</div>
			<div class="main1 submit0">
				<a href="javascript:zhuce();">注册</a>
				<!-- <input type="button" name="" id="login-btn" value="注册" onclick="login()" /> -->
			</div>
		</form>
		<div class="go-zc"><a href="<{:U('Public/login')}>">已有账号？点击登录</a></div>
	</div>



<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/rem.js"></script>
<script>
	// 验证用户名
	// $("#name").blur(function(){
	// 	var name = $('#name').val();
	// 	if(name.length==0||name.length<6){
	// 		console.log('不能少于6个字符');
	// 		namestatus = 0;
	// 		$('#names').css({"font-size":"12px","color":"red"}).html("*不能少于6个字符");
	// 	}else{
	// 		var url3 = "<{:U('Public/checkname')}>";
	// 		var data = {'name':name};
	// 		$.post(url3,data,function(e){
	// 			if(e.status == 1){
	// 				namestatus = 1;
	// 				$('#names').empty();
	// 				console.log(e.msg);
	// 				return false;
	// 			}else{
	// 				namestatus = 0;
	// 				console.log(e.msg);
	// 				$('#names').css({"font-size":"12px","color":"red"}).html("*用户名已存在");
	// 				return false;
	// 			}	
	// 		},'json');
	// 	}
	// });
	// 
	function zhuce(){
		var formData = new FormData($( "#signupForm" )[0]);
		// console.log(formData);
  	var url2 = "<{:U('Public/login')}>"

		// var url
  	$.ajax({  
  		url: "<{:U('Public/register')}>" ,  
  		type: 'POST',  
  		data: formData,  
  		async: false,  
  		cache: false,  
  		contentType: false,  
  		processData: false,  
  		success: function (e) {  
  			console.log(e.msg); 
  			window.location.href=url2;  
  		},  
  		error: function (e) {  
  			alert(e.msg);  
  		}  
  	}); 
	}
</script>
</body>
</html>